<include file="Public:header"/>
<script type="text/javascript">
$(document).ready(function(){
	$('select[name="bill_type"]').val('{$bill_type}');
	$('select[name="user_type"]').val('{$user_type}');
	$('select[name="account_type"]').val('{$account_type}');
	$('select[name="pay_type"]').val('{$pay_type}');
	$('select[name="time_type"]').val('{$time_type}');
	$('select[name="kw_type"]').val('{$kw_type}');
	$('input[name="price_type"][value="{$price_type}"]').attr('checked','checked');
	if($('select[name="time_type"]').val() == 'custom'){
		$('.custom_time').show();
	}
	$('select[name="time_type"]').change(function () {
		time_type = $(this).val();
		if(time_type == 'custom'){
			$('.custom_time').show();
		}else{
			$('.custom_time').hide();
		}
	})
});
</script>
<style type="text/css">
.condition div{
	margin: 5px 0px;
}
</style>
<div class="form_data">
	<form action="" method="get" filterValid="true">
	<div class="mod_data">
		<table width="100%" class="condition">
			<tr class="filter">
				<td width="38%" valign="top">
					<div>
						<span class="name">账户类型：</span>
						<select name="account_type">
							<option value="">全部</option>
							<php>$account_type_list = C('account_type_desc');</php>
							<volist name="account_type_list" id="val">
							<option value="{$key}">{$val}</option>
							</volist>
						</select>
					</div>
					
					<eq name="_city_id" value="">
					<div>
						<span class="name">区域：</span>
						{:W('Plugin/area_select', array('', 0, 0))}
					</div>
					</eq>

					<div>
						<span class="name">交易时间：</span>
						<select name="time_type">
							<option value="">全部</option>
							<option value="today">今天</option>
							<option value="week">一周</option>
							<option value="month">一个月</option>
							<option value="3month">三个月</option>
							<option value="custom">自定义</option>
						</select>
						<span style="display: none" class="custom_time">
							<input type="text" name="start_date" id="start_date" value="{$start_date}" onclick="WdatePicker({maxDate:'#F{$dp.$D(\\'end_date\\')}'})" style="width:80px;">
							至
							<input type="text" name="end_date" id="end_date" value="{$end_date}" onclick="WdatePicker({minDate:'#F{$dp.$D(\\'start_date\\')}'})" style="width:80px;">
						</span>
					</div>

					<div>
						<span class="name">关键字：</span>
						<select name="kw_type">
							<option value="order_sn">订单号</option>
							<option value="bill_id">流水号</option>
							<option value="realname">用户姓名</option>
							<option value="mobile">手机号</option>
							<option value="user_id">UserID</option>
						</select>
						<input type="text" name="k_word" value="{$k_word}" style="width:130px;"/>
					</div>
					
				</td>
				<td valign="top">
					<div>
						<span class="name">交易类型：</span>
						<select name="bill_type">
							<option value="">全部</option>
							<php>$bill_type_list = C('bill_type_desc');</php>
							<volist name="bill_type_list" id="val">
							<option value="{$key}">{$val}</option>
							</volist>
						</select>
					</div>
					
					<div>
						<span class="name">资金流向：</span>
						<label><input type="radio" class="radio" name="price_type" value="all">全部</label>
						<label><input type="radio" class="radio" name="price_type" value="in">收入</label>
						<label><input type="radio" class="radio" name="price_type" value="out">支出</label>
					</div>

					<div>
						<span class="name">交易方式：</span>
						<label><input type="checkbox" class="checkbox" name="pay_type[]" value="alipay" <eq name="pay_is_alipay" value="true">checked</eq>>支付宝</label>
						<label><input type="checkbox" class="checkbox" name="pay_type[]" value="weixin" <eq name="pay_is_weixin" value="true">checked</eq>>微信支付</label>
						<label><input type="checkbox" class="checkbox" name="pay_type[]" value="upmp" <eq name="pay_is_upmp" value="true">checked</eq>>银联支付</label>
						<label><input type="checkbox" class="checkbox" name="pay_type[]" value="kuaiqian" <eq name="pay_is_kuaiqian" value="true">checked</eq>>快钱支付</label>
					</div>
					
					<div>
						<span class="name">金额范围：</span>
						<input type="text" name="start_price" value="{$start_price}" style="width:80px;">
						-
						<input type="text" name="end_price" value="{$end_price}" style="width:80px;">
					</div>
				</td>
			</tr>
		</table>
		
	</div>
	<div class="mod_data">
		<button type="submit" class="btn btn-search">查询</button>
		<span class="btn btn-full-screen data-full-screen">全屏查看</span>
	</div>
	</form>
</div>
<div class="total">
	金额汇总:<span class="price">{$total_price}</span>，
	本页汇总：<span class="price">{$page_price}</span>
</div>
<div class="data_list">
	<table style="<neq name='table_width' value=''>width:{$table_width}px;</neq>">
		<tr>
			<volist name="data_title" id="rs">
				<th>{$rs['title']}</th>
			</volist>
		</tr>
		<volist name="list" id="rs">
		<tr>
		<volist name="data_title" id="val">
			<td <neq name="val.td_style" value="">style="{$val['td_style']}"</neq>>
			<span class="<neq name="val.val_class" value="">{$val['val_class']}</neq>">
				<php> if($rs[$key]){ </php>
					{$val['val_pre']}{$rs[$key]}
				<php> }else{ </php>
					{$val['val_pre']}{$val['val_default']}
				<php> } </php>
			</span>
			</td>
		</volist>
		</tr>
		</volist>
	</table>
</div>
<div class="page">{$page}</div>
<include file="Public:footer"/>